﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace QLLUONG
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        FormCV CV;
        private void Form1_Load(object sender, EventArgs e)
        {
            CV = new FormCV { TopLevel = false,Parent = tabControl1.TabPages[1],Dock = DockStyle.Fill};
            FormNV NV = new FormNV { TopLevel = false, Parent = tabControl1.TabPages[0], Dock = DockStyle.Fill };
            FormLuong Luong = new FormLuong { TopLevel = false, Parent = tabControl1.TabPages[2], Dock = DockStyle.Fill };
            FormSearch Search = new FormSearch { TopLevel = false, Parent = tabControl1.TabPages[4], Dock = DockStyle.Fill };
            CV.Show();
            NV.Show();
            Luong.Show();
            Search.Show();
        }

        private void ToolNhanVien_Click(object sender, EventArgs e)
        {
            
        }

        private void toolChucVu_Click(object sender, EventArgs e)
        {
            
                      
        }

        private void toolBangLuong_Click(object sender, EventArgs e)
        {
           
            
        }

        private void tabControl1_Selected(object sender, TabControlEventArgs e)
        {
       
            if (tabControl1.SelectedIndex == 5)
            {
                DialogResult h = MessageBox.Show
                ("Bạn có chắc muốn thoát không?", "Thông báo", MessageBoxButtons.OKCancel);
                if (h == DialogResult.OK)
                    Application.Exit();
            }
            if (tabControl1.SelectedIndex == 1)
            {
                CV.Refresh();
                
            }
            if (tabControl1.SelectedIndex == 3)
            {

            }
        
        }

    }
}
